package com.framework.modules.transaction;

import com.framework.exception.util.RespResult;
import com.framework.modules.sys.controller.AbstractController;
import com.framework.page.PageUtils;
import com.framework.service.yhbservice.YhbBenefitDayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("sys/yhbBenefit")
public class BenefitController extends AbstractController {

    @Autowired
    private YhbBenefitDayService yhbBenefitDayService;


    @RequestMapping("list")
    public RespResult list(@RequestParam  Map<String,Object> params){
        params.put("sysUserId",getDeptUserId());
       PageUtils page=yhbBenefitDayService.queryBenfitPage(params);
        return RespResult.ok().put("page",page);
    }

    @RequestMapping("detail")
    public  RespResult queryDetail( @RequestParam Map<String,Object> params){
        params.put("sysUserId",getDeptUserId());
        PageUtils page=yhbBenefitDayService.queryDetailByBenefitId(params);
        return RespResult.ok().put("page",page);
    }

}
